package hihocode;

import java.util.Scanner;

//逃离迷宫II, 太难了，不会

//见EscapeMazeII
public class BreakMize {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n, m;
		char[][] grid;
		while(scanner.hasNext()){
			n = scanner.nextInt();
			m = scanner.nextInt();
			grid = new char[n][m];
			for (int i = 0; i < n; i++) {
				grid[i] = scanner.next().toCharArray();
			}
		}
		scanner.close();
	}
}
